From: Jonas Ã…dahl Date: Wed, 17 Aug 2022 14:30:53 +0000 (+0200) Subject: layout: Destroy non-adopted uiGroup actors X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~405^2^2~234 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f2ca53b9e0442f6ce3100b20b5f0bdc195c4475d;p=gnome-shell.git layout: Destroy non-adopted uiGroup actors Move back actors that were adopted from mutter (window_group, top_window_group, the feedback group) from the uiGroup to the stage, and then destroy the uiGroup. This will tear down more or less all of GNOME Shells actors gracefully. Part-of: --- diff --git a/js/ui/layout.js b/js/ui/layout.js index 69bf14891..6be7cd041 100644 --- a/js/ui/layout.js +++ b/js/ui/layout.js @@ -221,6 +221,20 @@ var LayoutManager = GObject.registerClass({ global.stage.remove_actor(global.window_group); this.uiGroup.add_actor(global.window_group); + global.connect('shutdown', () => { + const adoptedUiGroupActors = [ + global.window_group, + global.top_window_group, + Meta.get_feedback_group_for_display(global.display), + ]; + + for (let adoptedActor of adoptedUiGroupActors) { + this.uiGroup.remove_actor(adoptedActor); + global.stage.add_actor(adoptedActor); + } + + this.uiGroup.destroy(); + }); // Using addChrome() to add actors to uiGroup will position actors // underneath the top_window_group.